<extend name="Base/common"/>

<block name="style">
    <link href="__CSS__/help.css" rel="stylesheet" type="text/css"/>
</block>

<block name="body">
<div class="col-md-12">
    <include file="Public/user_info"/>
    <include file="Public/_top_menu"/>
</div>

<div class="col-md-12 ">
<div class="bgwhite pull-left" style="min-height: 1000px;padding-bottom: 50px;margin-top: 0">
<div class="help_h">
    <a  href="{:U('help/usercenter/publish')}"  class="pull-left " style="width: 140px;">发布的帮忙</a>
    <a href="{:U('help/usercenter/attend')}" class="pull-left " style="width: 140px;">参加的帮忙</a>

    <a href="{:U('help/usercenter/snapshot')}" class="pull-left active" style="width: 180px;">帮忙的历史快照</a>

</div>


<div class=" col-xs-12">

<h2 style="margin-top: 20px">帮忙描述：</h2>

<div class="help_detail" style="">
    <div class="col-ten-2 col-xs-6" style="">
        <img src="{:getThumbImageById($snapshot['help']['cover_id'],168,168)}" style="margin-top: 11px;" class=""/>
    </div>
    <div class="col-ten-2 col-xs-6 pull-right  " style="border-left: 1px solid #ccc;height: 190px;">
        <div class="vertical_middle" style="height: 190px;">
            <p>
                <a class="author " href="{$snapshot['help'].user.space_url}" ucard="{$snapshot['help'].user.uid}">
                    {$snapshot['help'].user.nickname} </a>
            </p>

            <p>
                发布于{:date('Y年m月d日',$snapshot['help']['create_time'])}
            </p>

            <div>

            </div>

        </div>
    </div>
    <div class="col-ten-6 col-xs-12  help_detail_info">
        <div class="">
            <p class="help_detail_title">{$snapshot['help'].title}</p>

            <div class="dashed"></div>
        </div>
        <div class="pull-left div"><span class="help_detail_label"
                                         style="margin-left: 0">地区：</span><span
                class="help_detail_content">{:get_area($snapshot['help']['province'],$snapshot['help']['city'],$snapshot['help']['district'])}</span>
        </div>
        <div class="pull-left div"><span class="help_detail_label">类型：</span><span
                class="help_detail_content">{:get_type($snapshot['help']['type'])}</span></div>
        <div class="pull-left div"><span class="help_detail_label">性别：</span><span
                class="help_detail_content">{:get_sex($snapshot['help']['sex'])}</span></div>
        <div class="pull-left div"><span class="help_detail_label">年龄：</span><span
                class="help_detail_content">{$snapshot['help']['s_age']}-{$snapshot['help']['e_age']}</span></div>
        <div class="pull-left div"><span class="help_detail_label">身高：</span><span
                class="help_detail_content">{$snapshot['help']['s_height']}-{$snapshot['help']['e_height']}</span></div>
        <div class="pull-left div"><span class="help_detail_label">开始时间：</span><span
                class="help_detail_content">{:date('Y-m-d H:i:s',$snapshot['help']['s_time'])}  </span></div>
        <div class="pull-left div"><span class="help_detail_label">结束时间：</span><span
                class="help_detail_content">{:date('Y-m-d H:i:s',$snapshot['help']['e_time'])} </span></div>
        <div class="pull-left div"><span class="help_detail_label">人数：</span><span
                class="help_detail_content">{$snapshot['help']['number']}人</span></div>
    </div>
</div>

<div class="help_detail_description" style="margin:20px 10px">
    <div style="font-size: 20px;color: #000;margin: 20px 0 10px 0;">参考素材：</div>
    <div class="help_detail_content">
        {$snapshot['help']['description']}
    </div>

</div>
<div class="dashed"></div>


<php>
    if(!empty($snapshot['evaluate']) && !empty($snapshot['to_evaluate'])){
</php>


<h2 style="margin-top: 20px">帮忙评价：</h2>

<div class="solid"></div>
<div class="evaluate_list" style="padding: 0px 50px 10px 100px;">

    <div class="" style="padding:10px 0; ">
        <div class="pull-right" style="color: #a0a0a0"> 评价于{$snapshot.evaluate.create_time|friendlyDate}</div>
        <div class="clearfix">
            <div class="pull-left text-center" style="width: 64px;">
                <a class="author " href="{$snapshot.evaluate.user.space_url}"> <img
                        src="{$snapshot.evaluate.user.avatar64}"></a>
                <a class="author clearfix  " href="{$snapshot.evaluate.user.space_url}">{$snapshot.evaluate.user.nickname} </a>
            </div>

                            <span class="glyphicon glyphicon-arrow-right pull-left"
                                  style="font-size: 25px;color: #a0a0a0;height: 64px;line-height: 64px;padding: 0 10px;"></span>

            <div class="pull-left text-center" style="width: 64px;">
                <a class="author " href="{$snapshot.evaluate.to_user.space_url}"> <img
                        src="{$snapshot.evaluate.to_user.avatar64}"></a>
                <a class="author clearfix  "
                   href="{$snapshot.evaluate.to_user.space_url}">{$snapshot.evaluate.to_user.nickname} </a>
            </div>


            <div class="pull-left" style="margin-left: 20px">
                <a class="author" href="{$snapshot.evaluate.user.space_url}">{$snapshot.evaluate.user.nickname} </a> 对
                <a
                        class="author" href="{$snapshot.evaluate.to_user.space_url}">{$snapshot.evaluate.to_user.nickname} </a>评价：<span
                    style="color: #a0a0a0">
            {$snapshot.evaluate.type|get_evaluate_type}
            &nbsp;&nbsp;&nbsp;&nbsp;守时（{$snapshot.evaluate.punctual}分）&nbsp;&nbsp;&nbsp;&nbsp;守信（{$snapshot.evaluate.trustworthy}分）&nbsp;&nbsp;&nbsp;&nbsp;技能（{$snapshot.evaluate.technique}分）&nbsp;&nbsp;&nbsp;&nbsp;态度（{$snapshot.evaluate.attitude}分）
            </span>

                <div class="evaluate_content" style="padding: 20px 0 20px 0;color: #a0a0a0">
                    {$snapshot.evaluate.content}
                </div>
                <php>if(!empty($snapshot['evaluate']['attaches'][0])){</php>
                <div class="images popup-gallery" style="width: 100%">
                    <volist name="snapshot['evaluate']['attaches']" id="attach">
                        <a class="popup" href="{$attach|get_cover='path'}" title="点击查看大图"><img
                                src="{:getThumbImageById($attach,100,100)}" width="100" height="100"
                                style="margin-right: 7px;margin-bottom: 7px;"></a>
                    </volist>
                </div>
                <php>}</php>
                <div>

                </div>
            </div>
        </div>
    </div>

    <div class="dashed"></div>

    <div class="" style="padding:10px 0; ">
        <div class="pull-right" style="color: #a0a0a0"> 评价于{$snapshot.to_evaluate.create_time|friendlyDate}</div>
        <div class="clearfix">
            <div class="pull-left text-center" style="width: 64px;">
                <a class="author " href="{$snapshot.to_evaluate.user.space_url}"> <img
                        src="{$snapshot.to_evaluate.user.avatar64}"></a>
                <a class="author clearfix  " href="{$snapshot.to_evaluate.user.space_url}">{$snapshot.to_evaluate.user.nickname} </a>
            </div>

                            <span class="glyphicon glyphicon-arrow-right pull-left"
                                  style="font-size: 25px;color: #a0a0a0;height: 64px;line-height: 64px;padding: 0 10px;"></span>

            <div class="pull-left text-center" style="width: 64px;">
                <a class="author " href="{$snapshot.to_evaluate.to_user.space_url}"> <img
                        src="{$snapshot.to_evaluate.to_user.avatar64}"></a>
                <a class="author clearfix  "
                   href="{$snapshot.to_evaluate.to_user.space_url}">{$snapshot.to_evaluate.to_user.nickname} </a>
            </div>


            <div class="pull-left" style="margin-left: 20px">
                <a class="author"
                   href="{$snapshot.to_evaluate.user.space_url}">{$snapshot.to_evaluate.user.nickname} </a> 对 <a
                    class="author" href="{$snapshot.to_evaluate.to_user.space_url}">{$snapshot.to_evaluate.to_user.nickname} </a>评价：<span
                    style="color: #a0a0a0">
            {$snapshot.to_evaluate.type|get_evaluate_type}
            &nbsp;&nbsp;&nbsp;&nbsp;守时（{$snapshot.to_evaluate.punctual}分）&nbsp;&nbsp;&nbsp;&nbsp;守信（{$snapshot.to_evaluate.trustworthy}分）&nbsp;&nbsp;&nbsp;&nbsp;技能（{$snapshot.to_evaluate.technique}分）&nbsp;&nbsp;&nbsp;&nbsp;态度（{$snapshot.to_evaluate.attitude}分）
            </span>

                <div class="evaluate_content" style="padding: 20px 0 20px 0;color: #a0a0a0">
                    {$snapshot.to_evaluate.content}
                </div>
                <php>if(!empty($snapshot['to_evaluate']['attaches'][0])){</php>
                <div class="images popup-gallery" style="width: 100%">
                    <volist name="snapshot['to_evaluate']['attaches']" id="attach">
                        <a class="popup" href="{$attach|get_cover='path'}" title="点击查看大图"><img
                                src="{:getThumbImageById($attach,100,100)}" width="100" height="100"
                                style="margin-right: 7px;margin-bottom: 7px;"></a>
                    </volist>
                </div>
                <php>}</php>
                <div>

                </div>
            </div>
        </div>
    </div>
    <div class="dashed"></div>

</div>

<php>}</php>

<php>if(!empty($snapshot['work'])){</php>

<h2 style="margin-top: 20px">帮忙作品：</h2>

<div class=" ">
    <div class="help_detail help_production" style="">
        <div class="col-ten-2 col-xs-6" style="">
            <img src="{:getThumbImageById($snapshot['work']['cover'],168,168)}" style="margin-top: 11px;" class=""/>
        </div>
        <div class="col-ten-2 col-xs-6 pull-right  " style="border-left: 1px solid #ccc;height: 190px;">
            <div class="vertical_middle" style="height: 190px;">

                发布于{:date('Y年m月d日',$snapshot['work']['create_time'])}

            </div>
        </div>
        <div class="col-ten-6 help_detail_info">
            <div class="">
                <p class="help_detail_title"> {$snapshot.work.title}</p>

                <div class="dashed"></div>
            </div>
            <div class="pull-left help_production_info"> {$snapshot.work.detail}</div>
        </div>
    </div>

    <div class="pull-left help_detail_description " style="margin:20px 0px;width: 100%">

        <embed src="{$snapshot.work.video.1}" wmode="transparent" allowfullscreen="true"
               type="application/x-shockwave-flash" width="100%" height="500"></embed>

    </div>

    <volist name="snapshot.work.image" id="image">
        <div class="clearfix dashed" style="margin: 10px;"></div>
        <div class=" help_detail_description " style="margin:20px 0px">
            <img style="width: 100%" src="{$image|get_cover='path'}">
        </div>

    </volist>


    <div class="clearfix dashed" style=""></div>

    <div class="" style="text-align: center;margin:65px 0">
        <div style="width: 200px;margin: 0 auto">
            <div class="clearfix">
                <p> 大片 <span id="works_support">{$snapshot.work.support}</span></p>

                <p> 烂片 <span id="works_oppose">{$snapshot.work.oppose}</span></p>

                <p> 点评 <span id="works_comment">{$snapshot.work.comment}</span></p>
            </div>

        </div>

    </div>

</div>
<php>}</php>
</div>

</div>
</div>
<script>

    $(function () {
        $('.popup-gallery').each(function () { // the containers for all your galleries
            $(this).magnificPopup({
                delegate: '.popup',
                type: 'image',
                tLoading: 'Loading image #%curr%...',
                mainClass: 'mfp-img-mobile',
                gallery: {
                    enabled: true,
                    navigateByImgClick: true,
                    preload: [0, 1] // Will preload 0 - before current, and 1 after the current image
                },
                image: {
                    tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
                    titleSrc: function (item) {
                        /*           return item.el.attr('title') + '<small>by Marsel Van Oosten</small>';*/
                        return '';
                    }
                }
            });
        });
    });
</script>

</block>

